package main

import (
	"fmt"
	"math/rand"
)

func main() {
	target := rand.Intn(100) + 1
	fmt.Println("target:", target)

	for true {
		fmt.Println("请输入一个值")
		var num int
		fmt.Scan(&num)

		if num < target {
			fmt.Println("太小了！")
		} else if num > target {
			fmt.Println("太大了！")
		} else {
			fmt.Println("猜对了！")
			break
		}
	}
}
